import type { AddPoleParams, PoleListParams, PoleListRes } from "@/types/pole";
import { request } from "@/utils/reuqest";

/**
 * 获取一体杆列表
 */
export const getPoleListAPI = (params: PoleListParams) => {
  return request<PoleListRes>('/pole/info/list', 'GET', params);
};

/**
 * 添加一体杆
 */
export const addPloeAPI = (params: AddPoleParams) => {
  return request('/pole/info', 'POST', params)
}

/**
 * 删除一体杆
 */
export const delPoleAPI = (ids: number[]) => {
  return request(`/pole/info/${ids}`, 'DELETE')
}

/**
 * 编辑一体杆
 */
export const editPoleAPI = (params: AddPoleParams,id:number) => {
  return request(`/pole/info/${id}`, 'PUT', params)
}
